package courseselect.demoselect.web;

import courseselect.demoselect.entity.student;
import courseselect.demoselect.mapper.StudentMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.RequestMapping;

@Controller
public class personController {

    @Autowired
    private StudentMapper studentMapper;


    @ModelAttribute(value = "zhangshang")
    public  student addStudent(){
         return  studentMapper.getStudentByNumber(1);
    }


    @RequestMapping(value = "/person")
    public String helloWorld() {
        return "person";
    }
}
